Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TransactionTestCase.assertQuerySetEqual #189

Merged

Conversation

noelleleigh
Copy link

Adds the TransactionTestCase.assertQuerySetEqual method, which is the non-deprecated version of TransactionTestCase.assertQuerysetEqual, which was deprecated in Django 4.2 and is set to be removed in Django 5.1.

I don't know of a way with type annotations to copy the signature of one method to another, so I just copy-pasted them, while also making some improvements with generic types.

Adds the [`TransactionTestCase.assertQuerySetEqual` method][0], which is
the non-deprecated version of `TransactionTestCase.assertQuerysetEqual`,
which was deprecated in Django 4.2 and is set to be removed in Django
5.1.

I don't know of a way with type annotations to copy the signature of one
method to another, so I just copy-pasted them, while also making some
improvements with generic types.

[0]: https://docs.djangoproject.com/en/4.2/topics/testing/tools/#django.test.TransactionTestCase.assertQuerySetEqual
Copy link
Owner

@sbdchd sbdchd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kodiakhq kodiakhq bot merged commit d460cff into sbdchd:main Sep 8, 2023
@noelleleigh noelleleigh deleted the TransactionTestCase.assertQuerySetEqual branch September 8, 2023 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants